/*
 * v1.1 by tonydon site:txdnet.cn
 * netbeansIDE 7.1
 */
package cn.txdnet.txweb.model;

/**
 * @see 用于redirect,forward,velocity page
 * @author txdnet
 */
public class PageModel extends ModelView{
    
    private ViewType type;
    private String page;
    private String name;
    private Object model;

    public PageModel(ViewType type, String page, String name, Object model){
        this.type = type;
        this.page = page;
        this.name = name;
        this.model = model;
    }
    
   public PageModel(ViewType type, String page, Object model){
        this.type = type;
        this.page = page;
        this.name = null;
        this.model = model;
    }
    
    public PageModel(ViewType type, String page){
        this.type = type;
        this.page = page;
        this.name = null;
        this.model = null;
    }
    /**
     * @return the type
     */
    @Override
    public ViewType getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    @Override
    public void setType(ViewType type) {
        this.type = type;
    }

    /**
     * @return the page
     */
    public String getPage() {
        return page;
    }

    /**
     * @param page the page to set
     */
    public void setPage(String page) {
        this.page = page;
    }

    /**
     * @return the model
     */
    public Object getModel() {
        return model;
    }

    /**
     * @param model the model to set
     */
    public void setModel(Object model) {
        this.model = model;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    
}
